﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;

namespace BUS
{
    public class CTPhieuDatBUS
    {
        public string TaoCTDHMoi()
        {
            CTPhieuDatDAO dao = new CTPhieuDatDAO();
            return dao.TaoCTDHMoi();
        
        }
        public int ThemCTPhieuDat(CTPhieuDatDTO ctpdDTO)
        {
            CTPhieuDatDAO dao = new CTPhieuDatDAO();
            return dao.ThemCTPhieuDat(ctpdDTO);
        }
        public List<CTPhieuDatDTO> TheoDoiDatHang(string MaPD)
        {
            CTPhieuDatDAO dao = new CTPhieuDatDAO();
            return dao.TheoDoiDatHang(MaPD);
        }
        public int LaySoLuongDatHang(string MaSP,string MaDH)
        {
            CTPhieuDatDAO dao = new CTPhieuDatDAO();
            return dao.LaySoLuongDatHang(MaSP,MaDH);
        }
        public int CapNhatSoLuongDat(int soluong, string MaSP)
        {
            CTPhieuDatDAO dao = new CTPhieuDatDAO();
            return dao.CapNhatSoLuongDat(soluong, MaSP);
        }
        public List<CTPhieuDatDTO> LayMaSPTheoMaPD(string MaPD)
        {
            CTPhieuDatDAO dao = new CTPhieuDatDAO();
            return dao.LayMaSPTheoMaPD(MaPD);
        }
        public List<CTPhieuDatDTO> LayPhieuDatChuaNhap(string MaPD)
        {
            CTPhieuDatDAO dao = new CTPhieuDatDAO();
            return dao.LayPhieuDatChuaNhap(MaPD);
        }
    }
}
